package com.p;
 
import android.app.Activity;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.TextView;
 
public class ViewTextActivity extends Activity {
    public static final String TEXT_DATA = "textView1";
    ListView listItems;
 
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.text_view_layout);    
 
        Bundle extras = getIntent().getExtras();
        if(extras != null) {
            String theText = extras.getString(TEXT_DATA);
            if(theText != null) {
                TextView t = (TextView)findViewById(R.id.textView1);
                if(t != null) {
                    t.setText(theText);
                }
            }
        }
    }
}